<template>
    <div class="container">
        <div class="status-bar" :style="{'height': statusBarHeight + 'px'}"></div>
        <list class="wrap-container"  >
            <cell v-for="(list,index) in routes" :key="index">
                <div class="item-wrap" @click="openUrl(list)" >
                    <text class="item-title">{{list.title}}</text>
                </div>
            </cell>
        </list>
    </div>
</template>
<style scoped>
    .wrap-container{
        width: 750px;
    }
    .status-bar{
        width: 750px;
        background-color: #eeeeee;
    }

    .item-wrap{
        height: 300px;
        border-top-color: #898989;
        border-top-width: 1px;
        align-items: center;
        justify-content: center;
    }

    .item-title{
        font-size: 48px;
    }
</style>
<script>
import { Utils } from "weex-ui";
export default {
    data(){
        return {
            // wrapHeight: 1334,
            routes:[
                {
                    url:'test.animation',
                    title:'animation'
                },
                {
                    url: 'test.svg',
                    title: 'svg'
                },{
                    url:'test.weiui',
                    title: 'weiui按钮'
                },{
                    url:'test.gcanvas',
                    title:'gcanvas'
                },{
                    url:'test.pan',
                    title:'手势事件'
                },{
                    url:'test.scroll',
                    title:'列表事件'
                },{
                    url:'test.timing',
                    title:'时间事件'
                },{
                    url:'test.orientation',
                    title:'设备事件'
                },{
                    url:'test.color',
                    title:'颜色变化'
                },{
                    url:'test.netinfo',
                    title:'网络信息'
                },{
                    url:'test.lottie',
                    title:'lottie'
                },{
                    url:'test.image.picker',
                    title:'图片/视频选择'
                },{
                    url:'test.pdf',
                    title:'pdf'
                },{
                    url:'test.chart',
                    title:'样式动画'
                },{
                    url:'test.webview',
                    title:'webview'
                }
            ],
            statusBarHeight: weex.config.eros.statusBarHeight ? weex.config.eros.statusBarHeight : 40
        }
    },
    created(){
        // this.wrapHeight = Utils.env.getPageHeight();
    },
    methods:{
        openUrl(item){
            var vm = this;
            vm.$router.open({
                name:item.url,
                type:'PUSH',
                canBack:false,
                gesBack:false
            })
        }
    }
}
</script>
